package com.nf;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import java.util.Properties;

import java.util.List;
import java.util.Map;

public class Test {


    public static void main(String[] args) {

        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");

        Student s2 =(Student) ac.getBean("s2");

        Properties properties = s2.getProperties();
        System.out.println( properties );
        System.out.println( properties.get("password") );
//
//        Map<String, Car> carMap = s2.getCarMap();
//
//        Car car = carMap.get("粤C44444");
//        System.out.println(car.getName());

//        List<Car> carList = s2.getCarList();
//        for (Car c : carList){
//            System.out.println(c +"    " +c.getName());
//            //System.out.println(  c.getName()  );
//        }


//        Student s1 = new Student();
//        s1.setName("xiaoming");
//        s1.setAge(13);
//
//        Student s2 = new Student();
//        s1.setName("xiaohong");
//        s1.setAge(17);

    }
}